<!DOCTYPE html>
<html>
<head>
  <title>lua debug</title>
  <style>
    #result {
      margin-top: 10px;
    }
	#inputText {
      width: 99%;
      height: 200px;
	  resize: none;
	  vertical-align: top;
	     background-color: rgba(0, 0, 0, 0.5); /* 设置半透明的背景颜色 */
      opacity: 0.7; /* 设置整个<textarea>元素的透明度 */
      color: white; /* 设置文本颜色为白色，以便在半透明背景上显示 */
    }
	.right-btn {
		position: relative;
		  top: 1px;
		  left: 70%;
	}
  </style>
  <script>
    function execute() {
      var inputText = document.getElementById('inputText').value;
      window.parent.unityInstance.SendMessage('LuaWorker','Debug',inputText); 
      <!--  window.parent.unityInstance.SendMessage("webgl","jsNotify",inputText);-->
    }
	


    function clearInput() {
	  console.log(inputText.value)
      document.getElementById('inputText').value = '';
    }
	
	function onClose() {
	  var inputText = document.getElementById('inputText').value;
      clearInput();
	  var iframe = window.parent.document.getElementById('luadebug_iframeContainer');
	  <!-- console.log(iframe)  -->
	  iframe.style.display = 'none';
    }
  </script>
</head>
<body>
  <h1>lua debug</h1>
  
  <textarea type="text" wrap="soft" id="inputText" placeholder="lua code"></textarea>
  <p>                                          </p>
  <button class="right-btn" onclick="onClose()">Close</button>
  <button class="right-btn" onclick="clearInput()">Clear</button>
  <button class="right-btn" onclick="execute()">Execute</button>

 <!-- <div id="result"></div> -->
</body>
</html>